package smashedapples.adobe.stratus
{
	import flash.events.NetStatusEvent;
	import flash.net.NetConnection;
	
	import smashedapples.core.NonVisualComponent;

	
	//[Event( name="

	public class StratusAPI extends NonVisualComponent
	{
		public function StratusAPI()
		{
			super();
		}
		
		public var url:String = "rtmfp://stratus.adobe.com/";
		public var key:String = "a004778d49cb2395497271d2-028d92054464";
		
		public function get qualifiedUrl():String
		{
			return this.url + "/" + this.key + "/";
		}
		
		private var connection:NetConnection;
		
		public function createConnection():void
		{
			this.connection = new NetConnection();
			this.connection.addEventListener( NetStatusEvent.NET_STATUS, handleNetStatusEvent );
			this.connection.connect( this.qualifiedUrl );
		}
		
		private function handleNetStatusEvent( event:NetStatusEvent ):void
		{
			
		}
		
		[Bindable ( "connectionChanged" )]
		public function get isConnected():Boolean
		{
			return this.connection.connected;
		}
		
		public function send():void
		{
			
		}
		
		
		
	}
}